<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=windows-1250">
	<meta name="table creator">
	<title>c0nflict Table Creator</title>
	<style>
fieldset {
	border: 1px #468 solid;
	position: relative;
}

legend {
	color: #ffa;
	font-size: 1.1em;
}

#tablecreatorform {
	top: 0px;
	left: 0px;
}

#tablecreatorform label {
	color: #ffa;
	line-height: 1.5em;
	margin-bottom: .5em;
	padding-left: 1em;
}

#tablecreatorform input, #attack_style {
	background: #024;
	border: 1px #468 solid;
	color: #fff;
	padding: .25em;
}

#tablecreatorform #nametitle {
	display: block;
}

#tablecreatorform label:hover input, #tablecreatorform input:focus {
	background: #057;
	cursor: pointer;
}

#tablecreatorform label:hover {
	cursor: pointer;
}

#tablecreatorform p, #usertable {
	clear: both;
}

body {
	border: #000 solid;
	margin: 0;
	padding: 0;
	background: #000;
	color: #fff;
	font-family: Ariel, Sans-Serif;
}

.caption {
	font-family: verdana;
	text-align: justified;
	background-color: #aaaaaa;
	color: #000099;
	width: 600px;
	font-size: .7em;
	border-width: 0 2em;
	border-color: #000055;
	border: solid;
	padding: 4px;
}

#title {
	font-family: verdana;
	text-align: center;
}

#title h1 {
	background-color: #306;
	background-position: 0 0;
	margin: 0;
}

#title h2 {
	background-color: #000;
}

h1 {
	padding: 0 .5em;
	margin: 1em 0 0;
	background: #036 url(http://c0nflict.com/war/images/wb.png) repeat-x 0 -5px;
}

h2 {
	padding: 0 .5em;
	margin: 0;
	background: #034 url(http://c0nflict.com/war/images/wb.png) repeat-x 0 -7px;
}

a:link, a:visited, a:active {
	color: #afa;
	text-decoration: none;
}

a:hover {
	color: #ffa;
}

img {
	border: 2px #000 outset;
	-moz-border-radius: 8px;
}

.xstooltip 
{
    visibility: hidden; 
    position: absolute; 
    top: 0;  
    left: 0; 
    z-index: 2;
    background-color: #000;

    font: normal 9pt sans-serif; 
    padding: 3px; 
    border: solid 1px;
}
	</style>
<script type="text/javascript" src="../dwr/engine.js"></script>
<script type="text/javascript" src="../dwr/interface/Tracker.js"></script>
<script type="text/javascript" src="../dwr/util.js"></script>
<script type="text/javascript" src="TableCreator.js"></script>
</head>

<body onload="init_creator();">
<div id="tooltip_user_data" class="xstooltip">
This field enables you to load your own predefined data<br/>
instead of manually entering all required information.<br/>
<br/>
The elements must be separated by a '|' character<br/>
<br/>
Element order:<br/>
- Table name<br/>
- Table Width<br/>
- Table height<br/>
- Attack style (0 = All or Nothing, 1 = Partial)<br/>
- Start areas<br/>
- Start dice<br/>
- Dice cap<br/>
- Max roll<br/>
- % areas<br/>
- % dice<br/>
- Layout definition with values separated by a ',' (blocked = 0, empty = 1)
</div> 
<fieldset>
	<legend>Table Creator</legend>
	<div id="tablecreatorform">
	<table>
	<tr>
	<td width="320px">
		<table align="left">
			<tr><td>Table Name</td><td><input id="table_name" size="26"></td></tr>
			<tr>
				<td>
				<table align="left">
					<tr><td>Width&nbsp;</td><td><input id="table_width" size="2">&nbsp;</td></tr>
					<tr><td>Height&nbsp;</td><td><input id="table_height" size="2"></td></tr>
				</table>
				</td>
				<td>
				<table align="left">
				<tr>
					<td>
						<button onclick=
						"draw_table('usertable', document.getElementById('table_width').value, document.getElementById('table_height').value);">
						Resize</button>&nbsp;&nbsp;</td>
					<td><button onclick="process_table(0);">Clear</button></td>
				</tr>
				</table>
				</td>
			</tr>
			<tr>
				<td>Attack Style</td>
				<td>
					<select id="attack_style">
						<option value="0">All-or-Nothing</option>
						<option value="1">Partial</option>
					</select>
				</td>
			</tr>
			<tr><td colspan="2">Click on squares to toggle blocked areas</td></tr>
		</table>
	</td>
	<td width="160px">
		<table align="left">
			<tr><td>Start Areas</td><td><input id="start_areas" size="2" title="Number of areas each player starts with"></td></tr>
			<tr><td>Start Dice</td><td><input id="start_dice" size="2" title="Total dice allocated each player at game start"></td></tr>
			<tr><td>Dice Cap</td><td><input id="dice_cap" size="2" title="Max number of dice per area"></td></tr>
			<tr><td>Max Roll</td><td><input id="max_roll" size="2" title="Max roll of each individual die"></td></tr>
			<tr><td>% Black</td><td><input id="blackp" size="2" disabled="disabled"></td></tr>
		</table>
	</td>
	<td width="180px">
		<table align="left">
			<tr><td colspan="2"><b>Offturn Movement</b></td></tr>
			<tr><td>% Areas</td><td><input id="%_areas" size="2" title="Percent of total player's areas allowed to move during offturn"></td></tr>
			<tr><td>% Dice</td><td><input id="%_dice" size="2" title="Percent of each square's dice moved during an offturn move"></td></tr>
			<tr><td>&nbsp;</td></tr>
			<tr><td colspan="2" align="center"><button id="save_button" onclick="save_table()" style='background-color: lightgreen;'>
				<font size="4">Save</font></button></td></tr>
		</table>
	</td>
	<td>
		<table align="left" width="280px">
			<tr>
				<td>Tables</td>
				<td>
					<select id="tables" onchange="process_table(this.selectedIndex);">
						<option value="0" selected/>
					</select>
				</td>
			</tr>
			<tr>
				<td><button id="delete_button" onclick="delete_table()">Delete</button></td>
				<td><input type="checkbox" id="author_only_tables" title="Show only tables created by you" 
					onclick="load_tables()">Only tables I created</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td><input type="checkbox" id="unapproved" title="Unapproved" 
					onclick="load_tables()">Unapproved tables only</td>
			</tr>
			<tr><td colspan="2">User predefined layout</td></tr>
			<tr>
				<td><button id="delete_button" onclick="process_table(-1)">Process</button></td>
				<td><input id="user_data" size="40"
					onmouseover="xstooltip_show('tooltip_user_data', 'user_data', 0, 30);"
					onmouseout="xstooltip_hide('tooltip_user_data');"></td>
			</tr>
		</table>
	</td>
	</tr>
	</table>
	</div>
	<center>
		<div id="usertable"></div>
	</center>
</fieldset>
<script type="text/javascript">
load_tables();
</script>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-2738908-5"; urchinTracker();
</script>
	</body>
</html>
